/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState: { currentUser?: API.CurrentUser } | undefined) {
  const { currentUser } = initialState ?? {};
  console.log(currentUser?.id);
  return {
    canAdmin: currentUser && currentUser.id == 1,
    canYisheng: currentUser && currentUser.id == 2,
    canHushi: currentUser && currentUser.id == 3,
    canCaiwu: currentUser && currentUser.id == 4,
    canYaojishi: currentUser && currentUser.id == 5,
    canXiaoshou: currentUser && currentUser.id == 6,
  };
}
